package com.woniuxy.main.dynamic_lzq.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import com.woniuxy.main.dynamic_lzq.pojo.User;

public interface UserMapper_Lzq {
	@Select("select * from user")
	public List<User> allUser();
	
	@Insert("insert into user values(#{uname},#{pwd})")
	public void addUser(User user);
	
	
	@Select("select * from user where uname = #{uname}")
	public User findUserByName(String uname);
	
	@Select("select * from user where role_id=2")
	public List<User> listCoaches();

	@Select("select * from user where user_id=#{user_id}")
	public User findUserByUid(int user_id);
	
	@Select("select * from user where role_id=3")
	public List<User> listVenues();
	
	@Select("select * from user where role_id=1")
	public List<User> listStudents();
	
	
	
}
